
import { Button, Form, Input } from '@/components/base';
import styles from './index.module.less';
import * as funs from './funs';

interface ILogonForm {
    /** 用户名 */
    username: string;

    /** 密码 */
    password: string;
}

export default function Logon() {
    return (
        <div className={styles['logon']}>
            <Form<ILogonForm> className={styles['form']} layout='vertical' onFinish={e => { funs.logon(e.username, e.password) }} >
                <Form.Item label="用户名" name="username">
                    <Input size='large' placeholder="请输入用户名" />
                </Form.Item>
                <Form.Item label="密码" name="password">
                    <Input.Password size='large' placeholder="请输入密码" />
                </Form.Item>
                <Form.Item>
                    <Button type='primary' size='large' block htmlType="submit">登录</Button>
                </Form.Item>
            </Form>
        </div>
    )
}